﻿'Params
'name (Required) : The tag or artist to resolve
'api_key (Required) : A Last.fm API key.
'Auth
'This service does not require authentication. 

Public Structure RadioSearchResponse
	Dim station As Station
End Structure

Public Class RadioSearch
	Inherits BaseRequest
	Dim name As String = ""

	Public xmlresponse As XDocument = Nothing

	Public Sub New(name As String)
		Me.name = name
	End Sub

	Public Sub sendRequest()
		InitializeMembers("radio.search")

		AddMember("name", name, True)
		AddMember("api_key", My.Settings.api_key, True)

		xmlresponse = sendGETResponse()
	End Sub

	Public Function getResponse() As RadioSearchResponse
		Dim response As RadioSearchResponse = Nothing
		Try
			response.station = New Station(xmlresponse.<lfm>.<stations>.<station>.First)
		Catch ex As Exception

		End Try
		Return response
	End Function
End Class
